#include "Enemy.h"
#include "Win98.h"
#include "MainCharacter.h"
#include "Bullet.h"
#include "Weapon.h"
#include "ShootEmUp.h"
#include "GameManager.h"

#define NBTOUCH 6

using namespace Ogre;
using namespace std;



Win98::Win98()
{
	type = WIN98;
	initialize();
	initNbTouch();
}

void Win98::initNbTouch(){
	nbTouch = NBTOUCH;
}
void Win98::initialize()
{
	mDirection = Vector3::ZERO;

	mEntity = mSceneMgr->createEntity(getName(), "win98.mesh");
	mEntity->setUserObject( this );
	

	mSceneNode = mSceneMgr->getSceneNode(Enemy::DEFAULT_NODE_NAME)->createChildSceneNode(Enemy::DEFAULT_NODE_NAME+string("_")+getName());
	Vector3 initialPosition( 
		Math::RangeRandom(ShootEmUp::WORLD_MIN.x, ShootEmUp::WORLD_MAX.x), 
		Math::RangeRandom(ShootEmUp::WORLD_MIN.y, ShootEmUp::WORLD_MAX.y), 
		ShootEmUp::WORLD_MAX.z
		);
	mSceneNode->setPosition( initialPosition );
	mSceneNode->scale(0.3, 0.3, 0.3);
	if ( mEntity->isAttached() )
		mEntity->getParentSceneNode()->detachObject( mEntity );
	mSceneNode->attachObject( mEntity );
}

